* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    min-width: 1200px;
    overflow-x: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    display: flex;
    height: 100vh;
    width: 1200px;
    margin: 0 auto;
    flex-direction: column;
}

.tabs {
    display: flex;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0 20px;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab.active {
    color: #1890ff;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1890ff;
}

.tab:hover {
    color: #1890ff;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toolbar {
    background-color: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.preview {
    width: 400px;
    background-color: #fff;
    border-left: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
}

.preview-phone {
    position: relative;
    width: 280px;
    height: 560px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 30px;
    box-shadow: 0 0 0 10px #1a1a1a,
                0 0 0 11px #2a2a2a,
                0 0 0 12px #1a1a1a;
    overflow: hidden;
}

.preview-phone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 15px;
    background: #1a1a1a;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 1;
}

.preview-header {
    background-color: #f5f5f5;
    padding: 20px 10px 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: relative;
    z-index: 2;
}

.preview-content {
    padding: 15px;
    height: calc(100% - 60px);
    overflow-y: auto;
    position: relative;
    z-index: 2;
    background: #fff;
}

.component-list {
    margin-bottom: 20px;
}

.component-category {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.component-item {
    padding: 8px 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.component-item:hover {
    background-color: #e0e0e0;
}

.form-area {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    min-height: 300px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #fff;
    position: relative;
    cursor: move;
    user-select: none;
}

.form-item:hover {
    border-color: #1890ff;
}

.form-item.selected {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.form-item.dragging {
    opacity: 0.5;
    background-color: #f0f0f0;
}

.form-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.form-item-title {
    font-weight: bold;
}

.form-item-actions {
    display: flex;
    gap: 5px;
}

.form-item-action {
    cursor: pointer;
    color: #666;
}

.form-item-action:hover {
    color: #1890ff;
}

.form-item-content {
    margin-top: 5px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 80px;
}

.btn:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.btn-primary {
    background-color: #1890ff;
    color: white;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-default {
    background-color: #f0f0f0;
    color: #333;
}

.btn-default:hover {
    background-color: #d9d9d9;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.property-panel {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.property-group {
    margin-bottom: 15px;
}

.property-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.property-item {
    margin-bottom: 10px;
}

.property-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.property-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.property-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.property-checkbox {
    margin-right: 5px;
}

.preview-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 600px;
    overflow-y: auto;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.import-export {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.json-input-area {
    width: 100%;
    min-height: 150px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    white-space: pre;
}

.json-input-area:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.import-export-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.code-preview {
    margin-top: 20px;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-x: auto;
}

.sortable-ghost {
    opacity: 0.5;
    background-color: #e6f7ff;
}

.form-item-drag-handle {
    cursor: move;
    padding: 0 5px;
    color: #999;
}

.form-item-drag-handle:hover {
    color: #666;
}

:root {
  --transition-duration: 0.3s;
  --primary-color: #007bff;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #ddd;
  --shadow-color: rgba(0, 123, 255, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc720;
    --danger-color: #dc4559;
    --text-color: #f8f9fa;
    --bg-color: #212529;
    --border-color: #495057;
    --shadow-color: rgba(13, 110, 253, 0.25);
  }
}

body {
  margin: 0;
  padding: 20px;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.json-input-section {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 800px;
  max-height: 100vh;
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow-y: auto;
}

.json-input-section::-webkit-scrollbar {
  width: 8px;
}

.json-input-section::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 4px;
}

.json-input-section::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.json-input-section::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
  padding: 5px;
  line-height: 1;
}

.copy-button {
  background-color: var(--success-color);
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}

.copy-button:hover {
  background-color: var(--success-color);
  opacity: 0.9;
}

.json-input-section.show {
  display: block;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal-overlay.show {
  display: block;
}

.toggle-button {
  background-color: var(--primary-color);
  margin-bottom: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-button:hover {
  background-color: #0056b3;
}

textarea {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:hover {
  border-color: var(--primary-color);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--shadow-color);
}

button {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 4px;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

.parse-button {
  background-color: var(--primary-color);
}

.format-button {
  background-color: var(--warning-color);
  color: #000;
}

.validate-button {
  background-color: var(--success-color);
}

.add-button {
  background-color: #28a745;
}

.remove-button {
  background-color: #dc3545;
}

.validation-message {
  margin-top: 10px;
  padding: 5px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.format {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.output {
  margin: 15px 0;
  background-color: var(--bg-color);
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 15px;
}

label {
  font-weight: bold;
  margin-right: 15px;
  min-width: 150px;
  text-align: left;
  display: inline-block;
  white-space: nowrap;
}

input[type="text"],
select {
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text-color);
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: auto;
  min-width: 120px;
  max-width: 200px;
  transition: all 0.3s ease;
}

input:hover,
select:hover {
  border-color: var(--primary-color);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--shadow-color);
}

.loginparams-item,
.filtercriteria-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-start;
  width: 100%;
}

.filtercriteria-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
} 